﻿namespace Lanbt.Core.Utility.ExceptionExtent
{
    public class LanbtException:Exception
    {
        /// <summary>
        /// 错误描述
        /// </summary>
        public int Code { get; set; }

        public LanbtException(int code,string message):base(message)
        {
            this.Code = code;
        }

        public LanbtException(int code, string message,Exception? ex) : base(message,ex)
        {
            this.Code = code;
        }

        public LanbtException(ExceptionParam param):base(param.Message)
        {
            this.Code = param.Code;
        }

        public LanbtException(ExceptionParam param,params object[] format) : base(string.Format(param.Message,format))
        {
            this.Code = param.Code;
        }

        public LanbtException(ExceptionParam param,Exception? ex) : base(param.Message,ex)
        {
            this.Code = param.Code;
        }
    }
}
